<template>
  <div id="app">
    <!-- 放置一个svg的图标 -->
    <svg-icon icon-class="fullscreen" style="color:#fff; width: 20px; height: 20px" @click="changeScreen" />
  </div>
</template>
<script>
import screenfull from 'screenfull'
export default {
  name: 'ScreenFull',
  methods: {
    changeScreen() {
      console.log(12312)
      if (!screenfull.isEnabled) {
        this.$message.error('无法切换全屏')
      }
      screenfull.toggle()
    }
  }}
</script>
<style lang='scss' scoped></style>
